home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
spitfire
/
dcbchkup.zip
/
DCBCHKUP.DOC
< prev
next >
Wrap
Text File
|
1993-03-14
|
14KB
|
311 lines
The Dark Corner BBS
Ross Cassell-SysOp
Fidonet (1:3652/3)
CHKUP.BAT For SFCHKUP! Sfchkup Written By Mike Woltz, Author Of Spitfire
With The Ever Increasing Popularity Of The Electronic Bulletin Board And
What Can Be Done On It, As Far As Files And Such, Comes The Risks Of CPU
Viral Infections And The Like.. It Seems Like People Enjoy Taking A Hobby
And Making It As Dangerous For Everyone As It Is To Cross The Street.
With the Increasing Dangers Of VIral Infections To Both Your System And/Or
Your End Users, Comes The Advent Of Virus Scanning Software And Software
Used In Conjunction With Virus Scanning Software. In The Past Few Years There
Has Been Utilities Us BBS SysOps Can Utilize To Scan And Screen Files Uploaded
To Our Systems For Errors/Viruses! For The Most Part These Utilities Were
Clumsy, Had To Be Updated Alot And In Some Cases Wasted the Users Time Online
To Perform These Tests. It Makes Little Sense To Reward A Caller With Time
For A Upload, Only To Take That Time Away To Test His/Her Upload While They
Were Still Online!
In Comes SFCHKUP, Written By Mike Woltz! A Small Easy To Use And Extremely
Fast Utility! SFCHKUP Is Designed To Be Run When A Caller Is Not Online In
One Of Two Ways. First Way Is That It Is Executed In A Batch File After The
Caller Logs Off. Most Often In SFINIT.BAT. Like So..
@ECHO OFF
SFCHKUP %1
Then Any Other Commands You Use.
SFINIT.BAT Is Called By Spitfire After Each Call, Then After Execution Spitfire
Returns To "Ready For Caller". It Is Advised Per The SFCHKUP Documentation To
Make SFCHKUP The First Command In SFINIT.BAT. If The Previous Caller Uploaded
File<s>, SFCHKUP Will See This And Start Performing The Tests On The Files It
Finds In The Configured Upload Directory. If No Files Were Present Or Uploaded
By The Previous Caller, SFCHKUP Will Not Start Processing.
In The Event You Are Running Your BBS Underneath A Frontend Loader Such As
FRONTDOOR Or Binkleyterm, Spitfire When Run This Way Does Not Call SFINIT.BAT.
You Can Get Around This By Placing A Call Command For SFINIT.BAT At the End Of
Your Batch File That You Use For Spitfire Prior To It Returning Control To Your
Frontend Loader, Like So:
:EVENT_L
REM Place EVENT L Commands Here
GOTO LOOP
:END
CALL SFINIT.BAT
The Above Method Is The Ideal And Preferred Method Of Using SFCHKUP..
There Is A Second Way It Can Be Run. As A Maintainance EVENT Or From The
DOS Command Line.
Setting Up SFCHKUP Is Relatively Simple And You Can Refer To Its Documentation
On How. The TESTS SFCHKUP Can Perform Totally Depends On You. SFCHKUP Relies On
A Batch File Called CHKUP.BAT. In CHKUP.BAT Would Be The Commands To Search Your
Upload Directory For Uploads And Test/Scan Them etc etc.. How Well SFCHKUP Does
Its Job For You, Depends On Your Ability To Write A Batch File And The Commands
You Put In It! SFCHKUP Does Not Require You To Be A Programmer Or Have A College
Education. Since Its Release, I Have Seen People Say, I Cant Get It To Work Etc...
I Thought I Would Give Out My CHKUP.BAT!
My Setup Does Not Require To Many Utilities, To Run With, And It Is Assumed
That Most BBS SysOps Have The Major File Archivers On Hand Residing In A
Directory Sitting In Their Path. SFCHKUP.EXE, SFCHKUP.DAT And CHKUP.BAT Must
Reside In The Home Directory Of Your Spitfire Node Or Nodes.
Since The Release Of The Newest PKZIP/PKUNZIP <v204g> I Have Since Converted
All My Files To It, Including ARJ's And ZIP Files Zipped With v1.10 Of Pkzip.
I Use A Unique Approach To Accomplish This Goal On Uploads. Those Of You
Familair With ARJ Utility, Know That In It Is A File Called REARJ. This Utility
Can Be Used To Convert ARCHIVES From One Format To Another As Well At The Same
Time Perform A Virus Scan On It, Using SCAN.EXE. IF I Have A ARJ File Uploaded
REARJ Backs The File Up, Extracts It, Scans The File For Virii Then Converts
The Archive To ZIP. If The File Passes, The Backup File Is Deleted And We Have
Success.
Enough Wind, I Will Explain My CHKUP.BAT Below..
**Note**
This Batch File Is Written For My Setup, If You Choose To Use It, Some Editting
May Be Necessary To Reflect Paths,Directory Locations And Names.
@ECHO OFF
D:
CD\CHKUP1
MD CHKWORK
REM This Portion Changes To Drive D, Switches To The Directory Containing My
REM Uploads And Creates A Temporary Work Directory, Where All Testing Occurs.
REM The @ECHO OFF, Simply Suppresses The Batch File Output To Screen.
:TOP
C:\UTILS\MUV %1%2 D:\CHKUP1\CHKWORK
CD\CHKUP1\CHKWORK
IF EXIST *.ARJ GOTO ARJ
IF EXIST *.ZIP GOTO ZIP
IF EXIST *.LHA GOTO LZH
IF EXIST *.LZH GOTO LZH
IF EXIST *.ZOO GOTO ZOO
IF EXIST *.EXE GOTO EXE
GOTO END
REM This Portion Moves The Uploaded File At A One At A Time Basis To The
REM Test Directory, Then We Change Directory To That Directory. Please Note
REM I Am Using Mike Woltz's Move File Utility Called MUV. The %1 Represents
REM The File Name, %2 Represents The File Extension. These Parameters Are
REM Passed To The This Batch File By SFCHKUP. The If Exist Statements Then
REM Determine What Type Of File It Is And Points To Another Part Of This
REM Batch File For Processing.
:ARJ
C:\UTILS\REARJ %1.ARJ /TZIP /D /A /V
IF ERRORLEVEL 6 GOTO BAD
IF ERRORLEVEL 13 GOTO BAD
GOTO ZIP
LZH
IF EXIST %1.LHA RENAME %1.LHA %1.LZH
C:\UTILS\REARJ %1.LZH /TZIP /D /A /V
IF ERRORLEVEL 6 GOTO BAD
IF ERRORLEVEL 13 GOTO BAD
GOTO ZIP
:ZOO
C:\UTILS\REARJ %1.ZOO /TZIP /D /A /V
IF ERRORLEVEL 6 GOTO BAD
IF ERRORLEVEL 13 GOTO BAD
GOTO ZIP
REM If The Files To Be Processed Fall Into The Above Labels, This Portion
REM Extracts The Files From The Archive, Scans Them For Virii, Then Converts
REM The Parent Archive To The New Version Of PKZIP. If The File Cannot Be
REM Successfully Extracted Or It Fails The Virus Scan, REARJ Will Exit With A
REM Errorlevel That These Labels Will Use To Point To Another Section Of This
REM Batch File For Further Processing. If The File Passes, You Will Notice That
REM Successful Files Are Then Passed Over To The ZIP Label For Further Tests.
REM Note That When REARJ Starts The Conversion Process It Makes A Backup File.
REM Then Deletes The Backup File If Conversion Is Successful, REARJ Does Test
REM The New Archive To See If It Compressed Correctly And Can Be Decompressed
REM Correctly. Furthermore During The Conversion Process, If The Parent Archive
REM Contained Embedded Archives, Then Those Archives Will To Be Converted To
REM The New ZIP!
:ZIP
C:\UTILS\PKUNZIP %1.ZIP
IF ERRORLEVEL 1 GOTO BAD
IF EXIST PKZIP.EXE DEL PKZIP.EXE
IF EXIST PKUNZIP.EXE DEL PKUNZIP.EXE
IF EXIST COMMAND.COM DEL COMMAND.COM
C:\UTILS\SCAN *.* /NOMEM
IF ERRORLEVEL 1 GOTO BAD
IF EXIST %1.ZIP DEL %1.ZIP
C:\UTILS\PKZIP %1.ZIP *.*
C:\UTILS\DELXCEPT %1.ZIP
C:\UTILS\RECOM -S C:\UTILS\COMMENT.FIL %1.ZIP
GOTO MOVE
REM This Label Will Perform Tests On Inbound ZIP Files And Retest Any ZIP
REM File Converted Earlier In This Batch File. This Label Insures That All
REM ZIPS Will Be Converted Over To The New Zip. First I Use PKUNZIP To Extract
REM All The Files From The ZIP. If PKUNZIP Cannot Extract, It Will Exit With
REM Errorlevel 1, Which In Turn Will Point To Another Section Of This Batch
REM File For Processing. I Then Test To See If The Archives Contents Contained
REM PKZIP.EXE,PKUNZIP.EXE Or COMMAND.COM. If Found These 3 Files Will Be Deleted
REM The Reason For Doing This Is That Some Users Out Of Innocent Ignorance Or
REM Malicious Prank Include These In Files They Upload. This Way Insures That
REM During Conversion Process That Unneeded Files Are Omitted From The Parent
REM Archive And Your Testing Goes By Flawlessly.
REM A Virus Scan Is Then Performed On The Files. If The Files Fail, SCAN Will
REM Exit With Errorlevel 1, Again Pointing To Another Section Of This Batch
REM File For Processing. If The File Passes The Virus Scan The Original ZIP
REM File Is Then Deleted. I Then REZIP It With The NEW PKZIP. Then Using Mike
REM Woltz's DELXCEPT Utility, I DELETE All Files In The CHKWORK Directory Except
REM For The NEWLY Created ZIP. Then I Add My BBS Comment Using RECOM, And Then
REM I Point To Another Section Of The Batch File For Final Processing.
:EXE
MUV %1.EXE D:\HOLD
GOTO TOP
REM If The File To Be Tested Is A EXE, It Can Be Assumed That The File Is
REM Either A Self Extracting Archive Or The Uploader Is Fairly Wet Behind
REM The Ears, And Is Uploading You A Program, One File At A Time<g>. This
REM Portion Simply Moves All EXE Files To A Directory That Exists On A
REM Permanent Basis, For The SysOp To Do Manual Testing. In My Case, I Use
REM A Directory Called HOLD, To Hold Any EXE Files.
:BAD
C:\UTILS\MUV %1%2 D:\BADCHKUP
C:\UTILS\DELXCEPT %^$$^%!!.%^$
GOTO TOP
REM Files That Failed Either Extraction Or A Virus Scan Are Processed From
REM This BATCH Label.. These Files Are Simply Moved To A Directory Called
REM BADCHKUP. The SysOp Can Review These Files And Determine Their Fate.
REM SFCHKUP Will Subsequently Alert The Uploader Of The Failed File. I Then
REM USE Mike Woltz's DELXCEPT Utility To Make Sure All Files Are Removed From
REM The CHKWORK Directory.
:MOVE
IF EXIST %1.ZIP MUV %1.ZIP D:\CHKUP1
GOTO TOP
REM Files That Have Passed All Testing Are Returned To The Original Upload
REM Directory Where SFCHKUP Will Move Them To The Directory You Have Configured
REM For Tested Uploads. Please Note, That If The File Size And Extension Changed
REM During Testing, SFCHKUP Will Correct It. Also If The ZIP Contains A File
REM Called FILE_ID.DIZ, SFCHKUP Will Extract FILE_ID.DIZ And Use It For The File
REM Description In SFFILES.BBS. **NOTE** Will Use As Much Of FILE_ID.DIZ As It
REM Can Depending On How Many Lines FILE_ID.DIZ Contains Or What You Have Setup
REM In Spitfire For Number Of File Description Lines. Also SFCHKUP Will Not
REM Append To Or Alter A SFFILES.BBS If The Tested File Was Uploaded To SysOp
REM Only. It Will However Use The HEYSYSOP.LOG.
:END
CD\CHKUP1
RD CHKWORK
C:
CD\SF
REM After There Are No More Files To Process, This Part Of The Batch File Is
REM Called And The Temporary Test Directory Is Removed, We Then Return To
REM The SF Home Directory On Drive C.
This Process Is Rather Simple, Straight Forward And Get The Job Done!
There Is Certainly A Better Way Than Mine, But For Starters You Have
Something To Build On And Refer To.
There Are A Few Things To Take Note Of..
In This Batch File You Will Notice I Call The Utilities Used, With The
Pathname They Reside From. This Is To Insure That My Utilities Are Being
Used To Perform Tests On Or Convert The Files To. This Prevents The Same
Files That May Have Been Accidentally Or Purposely Included In These Archives
From Performing These Tests. When Executing Any Program, DOS Will Search The
Current Directory First Before It Searches The PATH.
Also In Sections Of This Batch File, You See %1 And %2 In Use. %1 Is The
Filename And %2 Is The Extension. Otherwards... If MYFILE.ZIP Was Uploaded,
SFCHKUP Would Pass Myfile.Zip To CHKUP.BAT. CHKUP.BAT Would See MYFILE As %1
And ZIP As %2. Also Do Not Worry, If There Is 6 Files To Be Tested, SFCHKUP
Tests The Files One At A Time.
You Will Need The Following Utilities In Addition To SFCHKUP To Run With:
PKZIP.EXE And PKUNZIP.EXE
Latest Versions Preferably, Although You Do Not Have To Have, Since This
Batch File Will Operate Fine With Any Version You Prefer
THE MAJOR ARCHIVERS
Good Idea To Have Them All So You Can Handle Whatever Comes Your Way. If You
Are Picky, You Can Alter This Batch File To Test Archives I Am Not Testing For,
Or Leave Out Certain Archives. If You Do Omit Certain Archives. Make Sure That
You Edit Your SFNOUP.DAT File Accordingly To Prevent Your Callers From Uploading
Those File Types.
MUV20.ZIP
Mike Woltz's Move A File Utility
DELXCEPT.ZIP
Mike Woltz's DELXCEPT ??? File Utility.
SCANV???.ZIP
Mcafees Virus Scanner, Obtain The Latest Versions!
RECOM105.ZIP
This Utility Will Replace A ZIP Files Comment With One Of Your Own. In The Event
You Do Not Wish To Inbed Your ZIP Files With A ZIP Comment. You Can Use A
Utility Called Stripzip To At Least Remove Any Existing Zip Comments. If You Do
Decide To Use STRIPZIP, Edit CHKUP.BAT Accordingly.
REARJ.EXE
This Utility Comes With The ARJ Package, (ARJXXXX.EXE, Where X Is Reflects The
Current Version. I Am Running On V2.30, I Understand That There Are Several Beta
Copies Circulating Around For A Future Revision) REARJ.EXE Uses A Config File
Called REARJ.CFG, I Have Included My REARJ.CFG File. I Cannot Include Any Other
Utility. The Enclosed REARJ.CFG File Is Ready To Go..
Furthermore, You Need To Make Sure That All The Utilities You Plan To Use
Reside In A Permanent Directory Residing Somewhere In Your Path Statement.
You Also Must Have Directories Set Up To:
Receive New Files Uploaded (Required)
Receive Files That Pass Testing (Required)
Receive EXE Files (Optional)
Receive Failed Files (Required)
That You Read The Instructions. (Always A Good Idea!)
Credits:
Special Thanks Goto Mike Woltz For Writing Tremendously Superior BBS Software
And Easy To Use Utilities.
And To Those Spitfire SysOps Who Along The Way Guided Me In Configuring And
Using SFCHKUP!
SPITFIRE
SFCHKUP
MUV
DELXCEPT
Are Registered Tradmarks Of Mike Woltz Of Buffalo Creek Software.
PKZIP/PKUNZIP
Are Registered Trademarks Of Phil Katz Of PKWARE
ARJ/REARJ
Are Registered Trademarks Belonging To Robert K Jung
RECOM
Is A Registered Trademark Of Michael C Loewen
***
The Above Mentioned Utilities, Can Be Obtained From Buffalo Creeks BBS Or
Your Favorite Neighborhood Spitfire BBS!
If You Have A Question, Problem Or Comment. You Can Direct It To Me Or Any
Spitfire SysOp!!!
I Can Be Reached At My BBS:
The Dark Corner BBS
(803)573-7069
14400 v32b v42b..
Or On Buffalo Creeks BBS
Or On FIDONET (1:3652/3)
***
Support Spitfire, Support Greatness!
The End <G>!!